:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  display: flex;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

.card {
  padding: 2em;
}

/* 让根容器撑满页面，由具体页面样式控制布局 */
#app {
  width: 100%;
  min-height: 100vh;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}

/* 首页整体样式，原 App.vue 中的样式统一迁移到此处 */
.home-container {
  width: 100%;
  min-height: 100vh;
  font-family: 'Arial', sans-serif;
  color: #333;
  display: flex;
  flex-direction: column;
}

/* 主头部样式 */
.main-header {
  width: 100%;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部左侧（Logo和导航） */
.header-left {
  display: flex;
  align-items: center;
  gap: 30px;
}

.logo-container {
  display: flex;
  align-items: center;
  height: 80px;
}

.logo {
  height: 40px;
  width: auto;
}

.site-title {
  font-size: 1.5rem;
  color: #2c3e50;
  margin: 0;
  font-weight: 600;
}

/* 导航菜单样式 */
.main-nav {
  height: 80px;
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 0 20px;
  height: 80px;
  line-height: 80px;
  color: #555;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #42b883;
  background-color: #f8f9fa;
}

.nav-item.active .nav-link {
  color: #42b883;
  background-color: #f0f9f4;
  border-bottom: 3px solid #42b883;
}

/* 头部右侧（功能区域） */
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* 搜索框样式 */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 250px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.search-input:focus {
  border-color: #42b883;
}

.search-button {
  height: 36px;
  padding: 0 16px;
  background-color: #42b883;
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
  text-align: left;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.search-button:hover {
  background-color: #369e6e;
}

/* 消息通知样式 */
.notification-container {
  position: relative;
}

.notification-button {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: background-color 0.3s ease;
}

.notification-button:hover {
  background-color: #f8f9fa;
}

.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 6px;
  background-color: #ff4757;
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 个人中心样式 */
.profile-container {
  position: relative;
}

.profile-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 20px;
  background-color: white;
  cursor: pointer;
  font-size: 0.9rem;
  color: #555;
  transition: all 0.3s ease;
}

.profile-button:hover {
  border-color: #42b883;
  color: #42b883;
  background-color: #f0f9f4;
}

.profile-icon {
  font-size: 1.1rem;
}

/* 页面主体内容样式 */
.main-content {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px;
}

.welcome-section {
  text-align: center;
  margin-bottom: 40px;
  padding: 60px 30px;
  background-color: #f8f9fa;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.welcome-section h2 {
  font-size: 2.5rem;
  color: #42b883;
  margin-bottom: 20px;
  font-weight: 600;
}

.welcome-text {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #555;
  max-width: 800px;
  margin: 0 auto;
}

/* 功能卡片样式 */
.features-section {
  margin-bottom: 60px;
}

.features-section h3 {
  text-align: center;
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 40px;
  font-weight: 600;
}

.feature-cards {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin-top: 30px;
}

.feature-card {
  flex: 1;
  padding: 30px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-color: #42b883;
}

.feature-card h4 {
  font-size: 1.4rem;
  color: #42b883;
  margin-bottom: 15px;
  font-weight: 600;
}

.feature-card p {
  color: #666;
  line-height: 1.6;
  font-size: 1rem;
}

/* 首页统计数据样式 */
.stats-section {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 20px;
  margin: 30px 0;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.stat-card {
  text-align: center;
  padding: 15px;
  background-color: white;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  flex: 1;
  min-width: 120px;
}

.stat-card h4 {
  font-size: 1rem;
  color: #666;
  margin: 0 0 10px 0;
}

.stat-card p {
  font-size: 1.5rem;
  color: #42b883;
  font-weight: bold;
  margin: 0;
}

.loading {
  text-align: center;
  padding: 20px;
  color: #666;
}

/* 页面底部样式 */
.page-footer {
  background-color: #2c3e50;
  color: #ecf0f1;
  padding: 30px 0;
  margin-top: 40px;
}

.page-footer p {
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
}

/* PC端布局容器 */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 80px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .main-header {
    max-width: 100%;
    padding: 0 15px;
  }

  .search-input {
    width: 200px;
  }
}

@media (max-width: 992px) {
  .nav-link {
    padding: 0 15px;
    font-size: 0.9rem;
  }

  .search-input {
    width: 180px;
  }
}

@media (max-width: 768px) {
  .main-header {
    flex-direction: column;
    height: auto;
    padding: 10px 15px;
  }

  .header-left {
    flex-direction: column;
    gap: 10px;
  }

  .logo-container {
    height: auto;
    margin-bottom: 10px;
  }

  .site-title {
    font-size: 1.2rem;
  }

  .main-nav {
    height: auto;
    width: 100%;
  }

  .nav-list {
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
  }

  .nav-item {
    flex: 1;
    min-width: 100px;
  }

  .nav-link {
    height: 40px;
    line-height: 40px;
    text-align: center;
    padding: 0 10px;
  }

  .header-right {
    width: 100%;
    justify-content: center;
    padding: 10px 0;
  }

  .search-input {
    width: 100%;
    max-width: 250px;
  }

  .welcome-section h2 {
    font-size: 2rem;
  }

  .feature-cards {
    flex-direction: column;
  }
}
